package com.totoro.domain;

import java.util.Collection;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 1.任何一个校内或校外员工都可以成为指导老师 2.只允许一个老师报题 有一个关联属性：指导资格年度。
 * 管理员会在毕业工作开始前，设置各员工的指导资格有的效年度 以便进行资格审查
 * 
 * @generated
 */
// 员工实体类
@Entity
@Table(name = "tutor")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Tutor extends Actor {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "tutor", fetch = FetchType.LAZY)
	private Collection<Tutorial> tutorial;// 指导的论文
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "proposer", fetch = FetchType.LAZY)
	private Collection<Project> project;// 老师申报的题目集合
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "reviewer", fetch = FetchType.LAZY)
	private Collection<ReviewProject> reviewProject;// 评阅的论文
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "publicReplyGroup_id")
	private PublicReplyGroup publicReplyGroup;// 答辩组
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "profTitle_id")
	private ProfTitle profTitle;// 职称
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "tutor")
	private Collection<Notice> notice;// 通知
	/**
	 * @generated
	 */
	private String qualifiedForYear;// 指导资格有效年度
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "degree_id")
	private Degree degree;// 学位

	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "examer")
	private Collection<Schedule> examedSchedule;// 检查进程表
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "tutorSupervision")
	private Collection<Supervision> supervision;// 督导的关联表

	// 空构造器
	public Tutor() {
	}

	/**
	 * @generated
	 */
	public String getQualifiedForYear() {
		return qualifiedForYear;
	}

	/**
	 * @param qualifiedForYear
	 * @generated
	 */
	public void setQualifiedForYear(String qualifiedForYear) {
		this.qualifiedForYear = qualifiedForYear;
	}

	public Collection<Tutorial> getTutorial() {
		return tutorial;
	}

	public void setTutorial(Collection<Tutorial> tutorial) {
		this.tutorial = tutorial;
	}

	public Collection<Project> getProject() {
		return project;
	}

	public void setProject(Collection<Project> project) {
		this.project = project;
	}

	public Collection<ReviewProject> getReviewProject() {
		return reviewProject;
	}

	public void setReviewProject(Collection<ReviewProject> reviewProject) {
		this.reviewProject = reviewProject;
	}

	public PublicReplyGroup getPublicReplyGroup() {
		return publicReplyGroup;
	}

	public void setPublicReplyGroup(PublicReplyGroup publicReplyGroup) {
		this.publicReplyGroup = publicReplyGroup;
	}

	public ProfTitle getProfTitle() {
		return profTitle;
	}

	public void setProfTitle(ProfTitle profTitle) {
		this.profTitle = profTitle;
	}

	public Collection<Notice> getNotice() {
		return notice;
	}

	public void setNotice(Collection<Notice> notice) {
		this.notice = notice;
	}

	public Degree getDegree() {
		return degree;
	}

	public void setDegree(Degree degree) {
		this.degree = degree;
	}

	public Collection<Schedule> getExamedSchedule() {
		return examedSchedule;
	}

	public void setExamedSchedule(Collection<Schedule> examedSchedule) {
		this.examedSchedule = examedSchedule;
	}

	public Collection<Supervision> getSupervision() {
		return supervision;
	}

	public void setSupervision(Collection<Supervision> supervision) {
		this.supervision = supervision;
	}

}